43 research outputs found
Hybrid differentiation strategies for simulation and analysis of applications in C
Computationally efficient and accurate derivatives are important to the success of many different types of numerical methods. Automatic differentation (AD) approaches compute truncation-free derivatives and can be efficient in many cases. Although present AD tools can provide a convenient implementation mechanism, the computational efficiency rarely compares to analytically derived versions that have been carefully implemented. The focus of this work is to combine the strength of these methods into a hybrid strategy that attempts to achieve an optimal balance of implementation and computational efficiency by selecting the appropriate components of the target algorithms for AD and analytical derivation. Although several AD approaches can be considered, our focus is on the use of template overloading forward AD tools in C++ applications. We demonstrate this hybrid strategy for a system of partial differential equations in gas dynamics. These methods apply however to other systems of differentiable equations, including DAEs and ODEs
Recommended from our members
Albany: Using Component-based Design to Develop a Flexible, Generic Multiphysics Analysis Code
Abstract:
Albany is a multiphysics code constructed by assembling a set of reusable, general components. It is an implicit, unstructured grid finite element code that hosts a set of advanced features that are readily combined within a single analysis run. Albany uses template-based generic programming methods to provide extensibility and flexibility; it employs a generic residual evaluation interface to support the easy addition and modification of physics. This interface is coupled to powerful automatic differentiation utilities that are used to implement efficient nonlinear solvers and preconditioners, and also to enable sensitivity analysis and embedded uncertainty quantification capabilities as part of the forward solve. The flexible application programming interfaces in Albany couple to two different adaptive mesh libraries; it internally employs generic integration machinery that supports tetrahedral, hexahedral, and hybrid meshes of user specified order. We present the overall design of Albany, and focus on the specifics of the integration of many of its advanced features. As Albany and the components that form it are openly available on the internet, it is our goal that the reader might find some of the design concepts useful in their own work. Albany results in a code that enables the rapid development of parallel, numerically efficient multiphysics software tools. In discussing the features and details of the integration of many of the components involved, we show the reader the wide variety of solution components that are available and what is possible when they are combined within a simulation capability.
Key Words: partial differential equations, finite element analysis, template-based generic programmin
Skunk and Raccoon Rabies in the Eastern United States: Temporal and Spatial Analysis
Since 1981, an epizootic of raccoon rabies has spread throughout the eastern United States. A concomitant increase in reported rabies cases in skunks has raised concerns that an independent maintenance cycle of rabies virus in skunks could become established, affecting current strategies of wildlife rabies control programs. Rabies surveillance data from 1981 through 2000 obtained from the health departments of 11 eastern states were used to analyze temporal and spatial characteristics of rabies epizootics in each species. Spatial analysis indicated that epizootics in raccoons and skunks moved in a similar direction from 1990 to 2000. Temporal regression analysis showed that the number of rabid raccoons predicted the number of rabid skunks through time, with a 1-month lag. In areas where the raccoon rabies virus variant is enzootic, spatio-temporal analysis does not provide evidence that this rabies virus variant is currently cycling independently among skunks
A Simple Convention for the Specification of Linear Algebra Function Prototypes in C++
This short note describes a simple convention for the specification of C++ function prototypes for linear algebra operations with vectors and matrices (or general linear operators). This convention leads to function prototypes that are derived directly from the mathematical expressions themselves (and are therefore easy to remember), allow for highly optimized implementations (through inlining in C++), and do not rely on any sophisticated C++ techniques so that even novice C++ programmers can understand and step through the code in a debugger
QPSchur: A dual, active-set, Schur-complement method for large-scale and structured convex quadratic programming
We describe an active-set, dual-feasible Schur-complement method for quadratic programming (QP) with positive definite Hessians. The formulation of the QP being solved is general and flexible, and is appropriate for many different application areas. Moreover, the specialized structure of the QP is abstracted away behind a fixed KKT matrix called K o and other problem matrices, which naturally leads to an object-oriented software implementation. Updates to the working set of active inequality constraints are facilitated using a dense Schur complement, which we expect to remain small. Here, the dual Schur complement method requires the projected Hessian to be positive definite for every working set considered by the algorithm. Therefore, this method is not appropriate for all QPs. While the Schur complement approach to linear algebra is very flexible with respect to allowing exploitation of problem structure, it is not as numerically stable as approaches using a QR factorization. However, we show that the use of fixed-precision iterative refinement helps to dramatically improve the numerical stability of this Schur complement algorithm. The use of the objectoriented QP solver implementation is demonstrated on two different application areas with specializations in each area; large-scale model predictive control (MPC) and reduced-space successive quadratic programming (with several different representations for the reduced Hessian). These results demonstrate that the QP solver can exploit application-specific structure in a computationally efficient and fairly robust manner as compared to other QP solver implementations
Vector reduction/transformation operators
Development of flexible linear algebra interfaces is an increasingly critical issue. Efficient and expressive interfaces are well established for some linear algebra abstractions, but not for vectors. Vectors differ from other abstractions in the diversity of necessary operations, sometimes requiring dozens for a given algorithm (e.g. interior-point methods for optimization). We discuss a new approach based on operator objects that are transported to the underlying data by the linear algebra library implementation, allowing developers of abstract numerical algorithms to easily extend the functionality regardless of computer architecture, application or data locality/organization. Numerical experiments demonstrate efficient implementation
National Nuclear Security Administration under Contract DE-AC04-94-AL85000.
Sandia is a multiprogram laboratory operated by Sandia Corporation